package com.chancingpack.dal.dao.mybatis;

import com.chancingpack.dal.dao.WxReceiveMessageDao;
import com.chancingpack.dal.model.WxReceiveMessage;
import com.chancingpack.dal.service.WxReceiveMessageMapper;
import com.chancingpack.dal.service.WxSendMessageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by lenovo on 2017/7/14.
 */
@Repository
public class WxReceiveMessageDaoImpl implements WxReceiveMessageDao {

    @Autowired
    private WxReceiveMessageMapper wxReceiveMessageMapper;

    /**
     * 录入收货信息数据
     * @param wxReceiveMessage
     * @return
     */
    public boolean insertReceiveMessage(WxReceiveMessage wxReceiveMessage) {
        return wxReceiveMessageMapper.insertSelective(wxReceiveMessage) > 0;
    }

    public boolean insertReceive(WxReceiveMessage record) {

        return wxReceiveMessageMapper.insertReceive(record)>0;
    }

    public List<Map<String, Object>> selectReceiveBydetailId(Map<String, Object> map) {
        return wxReceiveMessageMapper.selectReceiveBydetailId(map);
    }
}
